<template>
	<view style="padding: 20rpx 30rpx;">
		<view class="content">
			<view class="title">输码核销</view>
			<view class="msg">手动输入核销码进行核销</view>
			<view class="ipt">
				<input v-model="writeOffNo"/>
				<view @click="Confirm">确认核销</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { writeOff } from '@/core/api/index.js'
	export default{
		data(){
			return{
				writeOffNo:''
			}
		},
		methods:{
			async Confirm(){
				const data = await writeOff(this.writeOffNo)
				if(data.code == '00000'){
					this.writeOffNo = ''
					uni.showToast({
						title:'核销成功'
					})
				}
			}
		}
	}
</script>

<style lang="scss">
	.content{
		background-color: #fff;
		padding: 100rpx 0 50rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-self: center;
		.title{
			font-size: 36rpx;
		}
		.msg{
			color: var(--, #666);
            font-size: 28rpx;
			margin: 40rpx 0 30rpx;
		}
		.ipt{
			display: flex;
			width: 90%;
			input{
				padding-left: 30rpx;
				width: 480rpx;
				background-color: #F2F2F2;
				height: 80rpx;
				border-radius: 40rpx 0 0 40rpx;
			}
			view{
				width: 160rpx;
				height: 80rpx;
				background: var(--Color, #F26B2E);
                color:#fff;
				font-size: 28rpx;
				border-radius: 0 40rpx 40rpx 0;
				text-align: center;
				line-height: 79rpx;
			}
		}
	}
</style>